package com.sleet.yuemiao.controller;

import com.sleet.yuemiao.pojo.CustInfo;
import com.sleet.yuemiao.service.YueMiaoService;
import com.sleet.yuemiao.util.R;
import com.sleet.yuemiao.vo.CustomerVo;
import org.apache.http.HttpResponse;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @program: yuemiao
 * @ClassName YueMiaoController
 * @description:
 * @author: Liyongxing
 * @create: 2021-12-23 09:19
 **/
@RestController
@RequestMapping
@EnableConfigurationProperties({CustInfo.class})
public class YueMiaoController {
    @Resource
    YueMiaoService yueMiaoService;
    @Autowired
    CustInfo custInfo;
    /**
     * 直接发起约苗
     * @return
     */
    @GetMapping("/test")
    public Object test(){
        return custInfo.toString();
    }

    /**
     * 直接发起约苗
     * @return
     */
    @GetMapping("/Save20")
    public Object Save20(){
        return yueMiaoService.Save20(null);
    }
    /**
     * 根据医院可以预约的时间 获得疫苗数
     * @return
     */
    @GetMapping("/GetCustSubscribeDateDetail")
    public Object GetCustSubscribeDateDetail(){
        return yueMiaoService.GetCustSubscribeDateDetail();
    }
    @GetMapping("/selectValidTimeByCid")
    public Object selectValidTimeByCid(HttpResponse httpResponse){
        return yueMiaoService.selectValidTimeByCid("1885","25.11624","102.75205");
    }

}
